package cn.lisens.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import cn.lisens.modules.sys.interceptor.LoggerInterceptor;

/**
 * 日志拦截器配置
 * @author fastsun
 *
 */
@Configuration
public class LoggerInterceptorConfig implements WebMvcConfigurer {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		InterceptorRegistration registration = registry.addInterceptor(new LoggerInterceptor());
//		registration.addPathPatterns("");
		registration.excludePathPatterns("/static/**");
	}
}
